﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCSlideShowList.ascx.cs"
    Inherits="RedHouse.AdminControl.UserControls.UCSlideShowList" %>
<script type="text/javascript">
    function deleteItem(id) {
        if (confirm("Are you sure to delete this item?")) {
            $.ajax({
                type: "POST",
                url: "SlideShow.aspx/DeleteItem",
                data: "{'id': '" + id + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    alert('delete successfully');
                    location.reload(true);
                },
                error: function (data) {
                    alert('delete successfully');
                }
            })
        }
    };
</script>
<style type="text/css">
    .css-edit
    {
    }
</style>
<br />
<div class="input_field">
    <label for="dropdown">
        Location:
    </label>
    <asp:DropDownList CssClass="dropdown" ID="cboLocation" runat="server" AutoPostBack="true"/>
</div>
<div class="input_field">
    <label for="dropdown">
        Language:
    </label>
    <asp:DropDownList CssClass="dropdown" ID="cboLanguage" runat="server"  AutoPostBack="true"  />
</div>
<asp:Repeater runat="server" ID="rptNews">
    <HeaderTemplate>
        <table cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" class="checkall" />
                    </th>
                    <th>
                        Title
                    </th>
                    <%-- <th >
                        Description
                    </th>--%>
                    <th>
                        Description
                    </th>
                    <th>
                        Image
                    </th>
                    <th>
                        Actions
                    </th>
                </tr>
            </thead>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
            <td>
                <input type="checkbox" />
            </td>
            <td>
                <%#DataBinder.Eval(Container.DataItem,"Tile")%>
            </td>
            <%--  <td>
                <%#DataBinder.Eval(Container.DataItem, "NewsDetail.ShortDesc")%>
            </td>--%>
            <td>
                <%#DataBinder.Eval(Container.DataItem,"Description")%>
            </td>
            <td>
                <img src='<%#DataBinder.Eval(Container.DataItem,"ThumbImageUrl")%>' alt="image" style="width: 50px;
                    height: 50px;" />
            </td>
            <td>
                <a href="#" onclick="javascript:deleteItem('<%#DataBinder.Eval(Container.DataItem,"SlideShowId")%>');">
                    <img src="../assets/action_delete.png" alt="Delete" /></a> <a href="SlideShow.aspx?Action=1&Id=<%#DataBinder.Eval(Container.DataItem,"SlideShowId") %>">
                        <img class="css-edit" src="../assets/action_edit.png" alt="edit" /></a>
            </td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
        </tbody> </table>
    </FooterTemplate>
</asp:Repeater>
